<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title><?php echo $title; ?></title>
        <?php echo \Fuel\Core\Asset::css('bootstrap-select.css');?>
	<?php echo Asset::css('bootstrap.css'); ?>
        <?php echo \Fuel\Core\Asset::css('style.css');?>
        <?php echo \Fuel\Core\Asset::css('non-responsive.css');?>
        <link href="//netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">
        <?php echo \Fuel\Core\Asset::js('jquery-1.10.1.js');?>
        <?php echo \Fuel\Core\Asset::js('bootstrap-select.js');?>
        <?php echo \Fuel\Core\Asset::js('bootstrap.js');?>
        <?php echo \Fuel\Core\Asset::js('student.js');?>
</head>
<body>
    <header class="header background">
        <div class="container">
            <div class="row">
                <div class="col-xs-3">
                    <p class="logo">STUDENT</p>
                </div>
                <div class="col-xs-6">
                    <div class="row">
                    <?php echo Fuel\Core\Form::open(array('action' => 'home/index', 'method' => 'get', 'class' => 'form-inline'))?>
                            <div class="beta col-xs-10">
                            <?php echo Fuel\Core\Form::input(
                                    'search', 
                                    \Fuel\Core\Input::get(
                                            'search', 
                                            isset($search) ? $search->name : ''
                                     ), 
                                    array(
                                        'class' => 'form-control', 
                                        'placeholder' => 'Bạm muốn tìm đề thi môn nào ?',
                                    )
                            );?>
                            </div>
                            <div class="col-xs-2">
                            <?php echo Fuel\Core\Form::button('submit', '<span class="glyphicon glyphicon-search"><span>', array('class' => 'btn background btn-border'))?>    
                            </div>
                    <?php echo Fuel\Core\Form::close();?>
                    </div>
                </div>
                <div class="col-xs-3 text-center">
                    <?php if(\Auth\Auth::check()):?>
                    <ul class="nav-menu-head">
                        <li><?php echo Html::anchor('users/profile',  substr(\Auth\Auth::instance()->get_screen_name(), 0, 12), array('title' => \Auth\Auth::instance()->get_screen_name()));?></li>
                        /
                        <li><?php echo Html::anchor('home/logout','Đăng xuất');?></li>
                    </ul>
                    <?php else: ?>
                        <?php if(isset($subnav)):?>
                        <ul class="nav-menu-head">
                            <li class='<?php echo Arr::get($subnav, "login" ); ?>'><?php echo Html::anchor('home/login','Đăng nhập');?></li>
                            /
                            <li class='<?php echo Arr::get($subnav, "register" ); ?>'><?php echo Html::anchor('home/register','Đăng ký');?></li>
                        </ul>
                        <?php else:?>
                        <ul class="nav-menu-head">
                            <li><?php echo Html::anchor('home/login','Đăng nhập');?></li>
                            /
                            <li><?php echo Html::anchor('home/register','Đăng ký');?></li>
                        </ul>
                        <?php endif;?>
                    <?php endif;?>
                </div>
            </div>
        </div>
    </header>
    <article>
        <div class="container">
            <div class="row">
                <div class="col-xs-12">
                    <?php if (Session::get_flash('success')): ?>
                        <div class="alert alert-success">
                            <strong>Thành công</strong>
                            <p>
                            <?php echo implode('</p><p>', e((array) Session::get_flash('success'))); ?>
                            </p>
                        </div>
                        <?php endif; ?>
                        <?php if (Session::get_flash('error')): ?>
                        <div class="alert alert-error">
                            <strong>Có lỗi</strong>
                            <p>
                            <?php echo implode('</p><p>', e((array) Session::get_flash('error'))); ?>
                            </p>
                        </div>
                    <?php endif; ?>
                </div>
                <div class="col-xs-12">
                    <?php echo $content; ?>
                </div>
            </div>
            <div class="row">
        </div>
    </article>
    <footer>
        <div class="container foot">
            <div class="row">
                <div class="col-xs-4">
                    <ul class="type">
                        <li>
                            Danh mục tài liệu
                        </li>
                        <li>
                            <a href="#">Đề thi cuối kỳ</a>
                        </li>
                        <li>
                            <a href="#">Khóa luận</a>
                        </li>
                        <li>
                            <a href="#">Đồ án</a>
                        </li>
                        <li>
                            <a href="#">Tiểu luận</a>
                        </li>
                        <li>
                            <a href="#">Bài tập lớn</a>
                        </li>
                        <li>
                            <a href="#">Báo cáo</a>
                        </li>
                    </ul>
                </div>
                <div class="col-xs-4">
                    <ul class="type" style="margin-bottom: 0px;">
                        <li>
                            Danh mục ăn chơi
                        </li>
                    </ul>
                    <ul class="flickr-feed col-xs-8" style="padding-left: 20px;">
                        <li class="col-xs-6">
                            <a href="#"><?php echo \Fuel\Core\Asset::img('icon/icon-eating.jpg', array('class' => 'img-responsive'));?></a>
                        </li>
                        <li class="col-xs-6">
                            <a href="#"><?php echo \Fuel\Core\Asset::img('icon/icon-visit.jpg', array('class' => 'img-responsive'));?></a>
                        </li>
                        <li class="col-xs-6">
                            <a href="#"><?php echo \Fuel\Core\Asset::img('icon/icon-phuot.jpg', array('class' => 'img-responsive'));?></a>
                        </li>
                        <li class="col-xs-6">
                            <a href="#"><?php echo \Fuel\Core\Asset::img('icon/icon-film.jpg', array('class' => 'img-responsive'));?></a>
                        </li>
                    </ul>
                </div>
                <div class="col-xs-4">
                    <ul class="type">
                        <li>
                            Hướng dẫn
                        </li>
                        <li>
                            <a href="#">Giới thiệu</a> <a href="#">/</a> <a href="#">Liên hệ</a>
                        </li>
                        <li>
                            <a href="#">Hướng dẫn</a>
                        </li>
                    </ul>
                    
                    <ul class="type">
                        <li>
                            Chia sẻ
                        </li>
                        <li>
                            <div class="col-xs-3 beta">
                                <a href="#"><?php echo \Fuel\Core\Asset::img('icon/icon-face.jpg', array('class' => 'img-responsive'));?></a>
                            </div>
                            <div class="col-xs-3 beta">
                                <a href="#"><?php echo \Fuel\Core\Asset::img('icon/icon-google.jpg', array('class' => 'img-responsive'));?></a>
                            </div>
                            <div class="col-xs-3 beta">
                                <a href="#"><?php echo \Fuel\Core\Asset::img('icon/icon-tt.jpg', array('class' => 'img-responsive'));?></a>
                            </div>
                            <div class="col-xs-3 beta">
                                <a href="#"><?php echo \Fuel\Core\Asset::img('icon/icon-youtube.jpg', array('class' => 'img-responsive'));?></a>
                            </div>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </footer>
</body>
</html>
